package com.smtlive.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.smtlive.domain.User;
import com.smtlive.service.UserService;

@Controller
public class UserController {
	@Autowired
	UserService userService;

	@RequestMapping("/user")
	@ResponseBody
	public String user(){
		return "user";
	}
	
	@RequestMapping("/users")
	@ResponseBody
	public Iterable<User> hello(){
		return userService.findAllUser();
	}
}
